const state = {
    users: {},
    showFooter: true,
    dialogVisible: false,
    newArticle: [],
    isLogin: false,
    userHeader: "",
    userFunction: [
        {id: 1, name: "个人资料"},
        {id: 2, name: "我的评论"},
        {id: 3, name: "我的回复"},
        {id: 4, name: "我的点赞"},
        {id: 5, name: "我的收藏"},
        {id: 6, name: "我的博客"},
        {id:7,name:"我关注的人"},
        {id:8,name:"我的粉丝"}]
}
const mutations = {
    setUsers(state, val) {
        state.users = val;
    },
    setShowFooter(state, val) {
        state.showFooter = val;

    },
    setNewArticle(state, val) {
        state.newArticle = state.newArticle.concat(val);
    },
    setIsLogin(state, val) {
        state.isLogin = val;
    },
    setUserHeader(state, val) {
        state.userHeader = val;
    },
    setDialogVisible(state, val) {
        state.dialogVisible = val;
    }
}
const getters = {
    getUserFunction(state){
        return state.userFunction;
    },
    getUsers(state) {
        return state.users;
    },
    getIsLogin(state) {
        return state.isLogin;
    },
    getUserHeader(state) {
        return state.userHeader;
    },
    getDialogVisible(state) {
        return state.dialogVisible;
    }
}
export default {
    namespaced: true,
    state,
    mutations,
    getters
}